/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package tal.drivechain.expression;

import tal.drivechain.midi.MidiUtility;

/**
 *
 * @author Tal Eisenberg
 */
public class MidiFunctions {
    public static int command(String name) {
        return MidiUtility.commandNameToCode(name);
    }

    public static String commandCode(int code) {
        return MidiUtility.commandCodeToString(code);
    }

    public static int note(String name) {
        return MidiUtility.stringToNoteNumber(name);
    }

    public static String noteCode(int note) {
        return MidiUtility.noteNumberToString(note);
    }

    public static long duration(String dur) {
        return MidiUtility.parseMidiDuration(dur);
    }
}
